<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-orientation" content="portrait">
    <title>订单详情</title>
    <link rel="stylesheet" href="../../styles/h5/reset.min.css"/>
    <link rel="stylesheet" href="../../styles/h5/errortankuang.css"/>
    <!--以上为公共css样式-->
    <link rel="stylesheet" href="../../styles/h5/index.css"/>

    <script charset="utf-8" type="text/javascript" src="../../scripts/h5/jquery-1.9.1.min.js"></script>
    <script charset="utf-8" type="text/javascript" src="../../scripts/h5/jquery.modal.js"></script>
    <script charset="utf-8" type="text/javascript">
        countRem();
        function countRem(desW) {
            var desWh = desW || 750,
                    winW = document.documentElement.clientWidth;
            document.documentElement.style.fontSize = winW / desWh * 100 + "px";
        }
        $(window).resize(function () {
            countRem();
        });
    </script>
    <!--以上为公共js文件-->
</head>
<body>
<div class="zz-top"></div>
<div class="zz-list">
    <ul>
        <li>
            <span class="zz-bank zz-pay-money">交易金额(元)</span>
            <span class="zz-replace zz-transaction-color zz-font-32 zz-amt"></span>
        </li>
    </ul>
</div>
<div class="zz-top"></div>
<div class="zz-order-list ">
    <ul>
        <li>
            <span class="zz-left">交易时间</span>
            <span class="zz-right orderTimePOS"></span>
        </li>
        <li>
            <span class="zz-left">流水</span>
            <span class="zz-right hostLsNoPOS"></span>
        </li>
        <li>
            <span class="zz-left">终端号</span>
            <span class="zz-right terminalIdPOS"></span>
        </li>
        <li>
            <span class="zz-left">外部商户号</span>
            <span class="zz-right wMerchantIdPOS"></span>
        </li>
        <li>
            <span class="zz-left">商户订单号</span>
            <span class="zz-right orderNoPOS"></span>
        </li>
        <li class="cardNoP">
            <span class="zz-left">卡号</span>
            <span class="zz-right cardNoPOS"></span>
        </li>
        <li class="cardTypeP">
            <span class="zz-left">卡种</span>
            <span class="zz-right cardTypePOS"></span>
        </li>
        <li>
            <span class="zz-left">参考号</span>
            <span class="zz-right tranRrnPOS"></span>
        </li>
        <li>
            <span class="zz-left">交易类型</span>
            <span class="zz-right tranTypePOS"></span>
        </li>
        <!-- <li>
            <span class="zz-left">退费申请日期</span>
            <span class="zz-right refundDatePOS"></span>
        </li> -->
        <li>
            <span class="zz-left">交易结果</span>
            <span class="zz-right tranResultPOS"></span>
        </li>
    </ul>
</div>

</body>
<script charset="utf-8" type="text/javascript" src="../../scripts/h5/utils.js"></script>
<!-- <script charset="utf-8" type="text/javascript" src="../../scripts/h5/index.js"></script> -->
<script charset="utf-8" type="text/javascript">

    var queryURLParameter = utils.queryURLParameter();
    var hostLsNo = queryURLParameter.hostLsNo;
    var orderDate = queryURLParameter.orderDate;
    var storeId = queryURLParameter.storeId;
    var $tranTypePOS = $(".tranTypePOS");

    $.ajax({
        url: utils.ajaxUrl()+"h5/billDetail/getPosPayOrder",
        async: false,
        data: {
            hostLsNo: hostLsNo,
            orderDate: orderDate,
            storeId: storeId
        },
        type: 'get',
        success: function (res) {
            var res = JSON.parse(res);
            console.log(res);
            if (res && res.retCode == '0000') {
                var data = res;
                var tranType = data["tranType"];
                if(data["tranAmt"].slice(0,1)=="-"){
                	$(".zz-amt").css("color","#333")
                }
                $(".zz-amt").html(data["tranAmt"]);
                $(".orderTimePOS").html(data["orderTime"]);
                $(".hostLsNoPOS").html(data["hostLsNo"]);
                $(".terminalIdPOS").html(data["terminalId"]);
                $(".wMerchantIdPOS").html(data["wMerchantId"]);
                $(".orderNoPOS").html(data["orderNo"]);
                $(".cardNoPOS").html(data["cardNo"]);
                $(".cardTypePOS").html(data["cardType"]);
                $(".tranRrnPOS").html(data["tranRrn"]);
                $tranTypePOS.html(tranType);
                if(tranType == "支付宝支付" || tranType == "微信支付"){
                	$(".cardNoP").hide();
                	$(".cardTypeP").hide();
                }
                //$(".refundDatePOS").html(data["refundDate"]);
                $(".tranResultPOS").html(data["tranState"]);

            } else {
                new $.modal({
                    content: res.retMsg,//弹框内容
                    showcontent: true,//false为弹出框组件二，true为弹出框组件一
                }).show();
            }
        }
    });

</script>
</html>